﻿using ABlog.Domain.Entity.Foundation;
using ABlog.Domain.FormModel;
using ABlog.Domain.Service;
using EasyCommonCore.Extension;

namespace ABlog.Domain.Entity
{
    /// <summary>
    /// 国家
    /// </summary>
    public partial class CountryEntity : CreationAudited
    {
        /// <summary>
        /// 国家名称
        /// </summary>
        public string CountryName { get; set; }

        /// <summary>
        /// 数量
        /// </summary>
        public int Count { get; set; }
    }

    /// <summary>
    /// 国家
    /// </summary>
    public partial class CountryEntity
    {
        public CountryEntity() { }
        
        /// <summary>
        /// 添加国家
        /// </summary>
        /// <param name="userId">用户id</param>
        /// <param name="name">国家名称</param>
        public CountryEntity(string userId, string name) : base(userId)
        {
            AssertExtend.IsNotNull(name, "国家名称");
            CountryName = name;
            Count = 0;
        }
    }
}
